package com.victor.entity;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Entity
@Table(name = "personaltravel")
@Data
@NoArgsConstructor
@AllArgsConstructor
/**
 * 个人游记表
 * @author 
 *
 */
public class Personaltravel {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY) // 主键类型--自动递增生成
	@Column(name = "id", unique = true, nullable = false, length = 11)
	private Integer id;// 编号,

	@Column(name = "userid", length = 50)
	private String userid;// 用户id,

	@Column(name = "username", length = 50)
	private String username;// 用户名,

	@Column(name = "time", length = 50)
	private String time;// 创建时间,

	@Column(name = "flag", length = 50)
	private String flag;// 0-自己可见  1-全部

	@Column(name = "title", length = 50)
	private String title;// 标题,

	@Column(name = "content", length = 50)
	private String content;// 内容,

	@Column(name = "weizhi", length = 50)
	private String weizhi;// 位置,
	
	@Column(name = "audio", length = 50)
	private String audio;// 音频

	@Transient
	private String dianzan;// 点赞数
	
	@Transient
	private String ifpraise;//是否点赞  0-没点赞  1点赞了
	
	@Transient
	private String iffocus;//是否关注 0-没    1-关注
	
	@Transient
	private String ifcollecion;//是否收藏 0-没    1-收
	
	@Transient
	private User user;
	
	@Transient
	private List<Travel> travels;
	
	@Transient
	private List<TravelComments> travelComments;
}
